#include "Comm.hpp"

int main()
{
    //创建共享内存

    int shmid = creatShm(SHMSIZE);

    //关联
    char* start = attachShm(shmid);
    //sleep(10);
    //通信
    int n = 0;
    while(n < 30)
    {
        std::cout << "client send：" << start << std::endl;
        n++;
        sleep(1);
    }
    

    //去关联
    detachShm(start);
    //删除
    //sleep(5);
    delShm(shmid);

    return 0;
}